/*
 * FileName：TreeNode.java 
 * <p>
 * Copyright (c) 2017-2020 <a href="https://www.smartwx.info">hermit(1154808491@qq.com)</a>.
 * <p>
 * Licensed under the GNU General Public License, Version 3 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.gnu.org/licenses/gpl-3.0.html
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */
package com.smart.common.entity;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.NoArgsConstructor;

/**
 * ztree树节点
 *
 * @author hermit
 * @date 2017 -08-17 09:13:03
 */
@Data
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
public class TreeNode implements Serializable {

    private String id;// 子节点属性字段

    @JsonProperty(value = "pId")
    private String parentId;// 父节点属性字段

    private String name;// 节点名称

    private String url;// 请求路径，action

    @JsonProperty(value = "isParent")
    private boolean isParent;// 是否是父节点

    private boolean checked;// 是否选中

    private boolean open;// 是否展开

    private boolean nocheck;// 设置节点是否隐藏 checkbox / radio

    private String diyId;// 自定义id

    private String iconSkin;// 推荐使用：设置个性图标的 className

    private String icon;// 不推荐：自定义图标路径 展开、折叠 自定义图标相同

    private String iconOpen;// 不推荐：父节点自定义展开时图标的 URL 路径

    private String iconClose;// 不推荐：父节点自定义折叠时图标的 URL 路径

    private int level; // 层级

    private List<TreeNode> subList;

    private Boolean haveChildren;// 是否是第一个

    private Map<String, String> attrs; // 其他参数

    private boolean childOuter;// 是否允许成为子节点

    private boolean dropInner;// 拖拽到目标节点时，设置是否允许成为目标节点的子节点。

    private boolean dropRoot;// 拖拽到目标节点时，设置是否允许是否成为根节点

}
